package jh.jianguan.springboot.util;

import jh.jianguan.springboot.dto.IdWorker;
import org.springframework.stereotype.Repository;

/**
 * @description: 雪花算法
 * @author: guoc
 * @createDate: 2020/11/13 13:54
 */
@Repository
public class SnowFlakeId {

    public static Long getSnowflakeId(){
        long returnLong=0;
		IdWorker worker = new IdWorker(1,1,1);
		for (int i = 0; i < 22; i++) {
            returnLong = worker.nextId();
        }
        return returnLong;
    }

}
